package com.ycc.study.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Service;

import com.ycc.study.mapper.PersonMapper;
import com.ycc.study.service.PersonService;

@Service
public class PersonServiceImpl implements PersonService{
	
	@Resource
	private  PersonMapper personMapper;

	/* (non-Javadoc)
	 * @see com.ycc.study.service.PersonService#getallPerson()
	 */
	@Override
	public List<Map<String, Object>> getAllPerson() {
		return personMapper.getAllPerson();
	}

	/**.
	 * <p>Title: getOnePersion</p>
	 * <p>Description: </p>
	 * @param request
	 * @see com.ycc.study.service.PersonService#getOnePersion(javax.servlet.http.HttpServletRequest)
	 */
	@Override
	public List getOnePerson(HttpServletRequest request) {
		Map p=new HashMap();
		p.put("code", request.getParameter("username"));
		p.put("password", request.getParameter("password"));
		return personMapper.getOnePerson(p);
		
	}


}
